home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1787 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: uu4news.netcom.com!dodge!not-for-mail
  2. From: eddy@clipper.robadome.com (eddy Gorsuch)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Name-mangling standard
  5. Date: 12 Jan 1996 13:41:29 -0800
  6. Organization: Siemens Rolm Communications Inc.
  7. Message-ID: <4d6ki9$6e3@eclipse.eng.sc.rolm.com>
  8. References: <20c.32169.607@newage.com.ar> <4bsnbu$5mu@mujibur.inmind.com> <30EDC013.7C780E5E@cims.nyu.edu> <DL1pqE.KKq@infosoft.com>
  9. NNTP-Posting-Host: eclipse.eng.sc.rolm.com
  10.  
  11. In article <DL1pqE.KKq@infosoft.com>, John Galt <jgalt@infosoft.com> wrote:
  12. >I beg to differ.  Name mangling serves several indispensible functions:
  13. >
  14. >1.  It makes it possible to have more than one function with the same name
  15. >(differing in their argument lists).  To do this without mangling, the linker
  16. >would have to see not just a function name, or even class::name, but a full
  17. >_prototype_ for each function (omitting variable names and the result type).
  18. >
  19. >2.  It allows the linker to do error checking.  Example:  Module A calls
  20. >foo() in module B.  I change the definition of foo (and its argument list)
  21. >but forget to change A.  Without name mangling, the program will simply crash
  22. >(or do strange things because I've clobbered the stack...)
  23. [...]
  24. >In short, wanting to eliminate name mangling is like wanting a compiler that
  25. >never prints error messages.  It's for people who would rather walk off a
  26. >cliff than have someone tell them they're about to.
  27.  
  28. But if a linker understood the name "foo::bar(char*&, const char *)", would
  29. name mangling be necessary? If the linker allowed special characters in its
  30. names, both problems listed above are solved without mangling the name.
  31.  
  32. eddy
  33. -- 
  34. ed.dy \'ed-e-\ n [ME (Sc dial.) ydy, prob. fr. ON itha; akin to OHG ith- 
  35.    again], L et and 1a: a current of water or air running contrary to the main 
  36.    current; esp)X : a small whirlpool 1b: a substance moving similarly  2: a 
  37.    contrary or circular current  - eddy vb
  38.